package com.hxd.charitysystem.utils

import com.xuexiang.xui.widget.banner.widget.banner.BannerItem
import java.util.*

/**
 *  项目名：    CharitySystem
 *  包名：      com.hxd.charitysystem.utils
 *  文件名:     DemoDataProvider
 *  创建者:     HXD
 *  创建时间:   2019/4/28 20:42
 *  描述:       用于演示数据
 */

class DemoDataProvider {
    companion object {
        //初始化图片
        open var urls = arrayOf(
            "https://cdn.8btc.com/wp-content/uploads/2016/03/QQ%E6%88%AA%E5%9B%BE20160318180953.png",
            "https://cdn.8btc.com/wp-content/uploads/2015/01/112.png",
            "https://cdn.8btc.com/wp-content/uploads/2015/01/IBM-Samsung-Adept.jpg",
            "https://cdn.8btc.com/wp-content/uploads/2016/03/%E6%AF%94%E7%89%B9%E4%BF%A1%EF%BC%88Bitmessage%EF%BC%89.jpg",
            "https://cdn.8btc.com/wp-content/uploads/2016/12/purse.jpg"
        )

        //初始化标题
        open var titles = arrayOf(
            "银行业之后，区块链又要颠覆物联网",
            "如何让几十亿物联网设备加入比特币网络？",
            "IBM联合三星：利用以太坊协议打造去中心化的物联网Adept",
            "“棱镜杀手”比特信（Bitmessage）火起来了",
            "亚马逊商品享受15%折扣，Purse联合Coinsecure让比特币在印度使用更广"
        )

        //初始化链接
        open var clickArray = arrayOf(
            "https://www.8btc.com/article/83759",
            "https://www.8btc.com/article/44129",
            "https://www.8btc.com/article/43179",
            "https://www.8btc.com/article/83793",
            "https://www.8btc.com/article/113331"
        )

        fun getDatas():ArrayList<BannerItem>{
            var datas:ArrayList<BannerItem> = ArrayList()
            for (i in urls.indices) {
                val item = BannerItem()
                item.imgUrl = urls[i]
                item.title = titles[i]
                datas.add(item)
            }
            return datas
        }
    }

}